package com.example.dynamic_forms.client;

import java.util.ArrayList;

import com.google.gwt.json.client.JSONObject;
import com.google.gwt.user.client.rpc.RemoteService;
import com.example.dynamic_forms.client.User;
import com.example.dynamic_forms.shared.GlobalData;
import com.example.dynamic_forms.shared.GlobalFormData;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;


/**
 * The client side stub for the RPC service.
 */
@RemoteServiceRelativePath("greet")

public interface GreetingService extends RemoteService {
	public String authenticateUser(String user1, String pass1);
	public String getBasicInfo(String eid);
	
	public User insertUser(String uname, String passwd, String sec_q, String sec_ans);
	
	public String insertPatient(String chartID , String EMPI, String Lname, String Fname, String Gender, String DOB, String AdmnDate , String Race, int ht, int wt, String nicotine, String PendLitGn , String wrkrComp, String UserName);
	
	public User insertMiscData(String table_name,String EMPI, String col, String val);
	
	public String insertOperation (String EMPI, String procType, String surgeon, String procDate, String cutTime, String closeTime, int EBL , String intraOPComp, String complicn, String procNotes, String username);
	
	public String insertImageData(String image_date, String image_type, int body_part, String EMPI, String username);
	
	public String insertImageInterpretationData( int image_ID, int operation_detail_ID ,String image_months, String overall_fusion, int overall_score, String username);
	
	public String insertImageView (int image_ID, String classification, String username);
	
	public User insertData(String formnm, String EMPI, String[] col, String[] val);
	
	public String insertReadsData( int interpretation_ID, String fusion, int score, String left, String right, String center, String reader, String Username);
	
	public String insertForm(String form_name,String date_created ,String creator ,String form_modified);
	
	public String insertFormField(int form_id,int formfield_id ,String question ,String form_name ,String datatype ,String defaultVal ,int multiVal, String flg, String reftbl, String refattri);
	
	public User insertFormFieldAddorDel(int form_id,int formfield_srno_add ,int form_modified_id);

	public User insertOptions(int formfield_srno,String option);
	
	public User updateTabledefination(String tbl_name, String cardinality, String uniqueattrinm, String reltable, String relattri, String relationshipName);
	
	public String insertOpnDetail(String proc_ID, String cageType, int cageHt,
			int cageLordosis, String BMP, String plateType, String screwType,
			String level, String username);
	public String selectOperation(String EMPI , String procDate);
	
	public String selectImage(String EMPI, String image_date);
	
	public String selectOperationDetail(String EMPI, String username);
	
	public String selectImageInterID(int operation_detail_ID, int image_ID);
	
	public String selectFormId(String form_name);
	
	public String selectModifiedFormId(String form_modified);
	
	public String selectprimkey(String tbl_nm);
	
	public String getFormId(String username, String form_name);
	
	public String getFormfieldDetails(int form_id, int mod_form_id);
	
	public String getFormNames();
	
	public String getPatNames(); 
	
	public String getEMPI(String patname);
	
	public String selectFormFieldSno(int form_id,int formfield_id ,String question);
	
	public ArrayList selectTableNames();
	public ArrayList selectAttributeNames(String table_name);
	
	public ArrayList<ArrayList> getPKFK(ArrayList<String> selectedTbl);
	public ArrayList<ArrayList<String>> getQueryResult(String Query);
	
	public User saveQuery(String uname, String queryToSave, String DBname);
	public ArrayList<ArrayList> getKeys(ArrayList<ArrayList<String>> selectedTbls);
}
